package com.demo.logistics.stockControl.ui;

import android.app.ListActivity;
import android.os.Bundle;

import com.demo.logistics.stockControl.IProductListView;
import com.demo.logistics.stockControl.presenter.StockPresenter;

public class ProductListView extends ListActivity implements IProductListView {

	private StockPresenter _present;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		_present = new StockPresenter(this);
		bindProductData();
	}
	
	@Override
	public void bindProductData() {
		ProductListArrayAdapter slaa = new ProductListArrayAdapter(this, _present.fetchAllProducts());
		setListAdapter(slaa);
	}

}
